package com.tc.biz.service;

import com.tc.biz.entity.DrainagePipeMaintainence;
import org.activiti.engine.runtime.ProcessInstance;

import java.util.Map;

/**
 * @author zengqingfa
 * @date 2019/11/4 16:34
 * @description
 * @email zengqingfa_java@163.com
 */
public interface IDrainagePipeMainService {

    int deleteByPrimaryKey(String id);

    int insert(DrainagePipeMaintainence record);

    int insertSelective(DrainagePipeMaintainence record);

    DrainagePipeMaintainence selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(DrainagePipeMaintainence record);

    int updateByPrimaryKey(DrainagePipeMaintainence record);

    ProcessInstance start(DrainagePipeMaintainence drainagePipeMaintainence, Map<String, Object> variables, String userId, String processDefinitionId);

    DrainagePipeMaintainence findByProcessInstanceId(String processInstanceId);

    /**
     * 查询某个流程实例是由谁发起的
     * @param taskId
     * @return
     */
    public String getStartedBy(String taskId);

    /**
     * 查询某个流程实例是由谁发起的
     * @param processInstanceId
     * @return
     */
    public String getStartedByProcessInstanceId(String processInstanceId);
}
